home *** CD-ROM | disk | FTP | other *** search
/ Micromanía 93 / CDMM_93_2.ISO / Project Nomads / nomads_demo_eng.exe / DEFAULTEVENTS.TCL < prev    next >
Encoding:
Text File  |  2002-07-30  |  15.3 KB  |  436 lines

  1. #-------------------------------------------------------------------------------
  2. #   defaultevents.tcl
  3. #   =================
  4. #   Define the default event handlers for feedback events. This file
  5. #   is automatically loaded when a part is activated.
  6. #
  7. #   (C) 2002 RadonLabs GmbH
  8. #
  9. #   03-Apr-02   floh    created
  10. #-------------------------------------------------------------------------------
  11.  
  12. puts "*** LOADING DEFAULT EVENT HANDLERS"
  13.  
  14. #-------------------------------------------------------------------------------
  15. #   The player island, or a player building is attacked by missile or
  16. #   machine guns.
  17. #-------------------------------------------------------------------------------
  18. on _islandattacked {
  19.     playfeedbacksound book:feedback/islandattacked.wav
  20.     textmessage island_attacked
  21. }
  22.  
  23. #-------------------------------------------------------------------------------
  24. #   A navpoint has been enabled.
  25. #-------------------------------------------------------------------------------
  26. on _navpointenabled {
  27.     playfeedbacksound book:feedback/navpointenabled.wav
  28.     textmessage navpoint_available
  29. }
  30.  
  31. #-------------------------------------------------------------------------------
  32. #   A navpoint has been reached
  33. #-------------------------------------------------------------------------------
  34. on _navpointreached {
  35.     playfeedbacksound book:feedback/navpointreached.wav
  36.     textmessage navpoint_reach
  37. }
  38.  
  39. #-------------------------------------------------------------------------------
  40. #   The player vehicle is inside the danger zone around the player island.
  41. #-------------------------------------------------------------------------------
  42. on _indangerzone {
  43.     playfeedbacksound book:feedback/indangerzone.wav
  44.     textmessage danger
  45. }
  46.  
  47. #-------------------------------------------------------------------------------
  48. #   The part is over (including fadeout)
  49. #-------------------------------------------------------------------------------
  50. on _partfinished {
  51.     /game/handler/book.activatenextpart
  52. }
  53.  
  54. #-------------------------------------------------------------------------------
  55. #   There is no place to build on the island
  56. #-------------------------------------------------------------------------------
  57. on _nobuildareaavailable {
  58.     playfeedbacksound book:feedback/nobuildarea.wav
  59.     textmessage no_buildslot
  60. }
  61.  
  62. #-------------------------------------------------------------------------------
  63. #   An artefact has been collected by the player.
  64. #-------------------------------------------------------------------------------
  65. on _artefactcollected {
  66.     playfeedbacksound book:feedback/artefactcollected.wav
  67. }
  68.  
  69. #-------------------------------------------------------------------------------
  70. #   The player repairs a building
  71. #-------------------------------------------------------------------------------
  72. on _repairbuilding {
  73.     playfeedbacksound book:feedback/repairbuilding.wav
  74. }
  75.  
  76. #-------------------------------------------------------------------------------
  77. #   The player has no energy for a specific action
  78. #-------------------------------------------------------------------------------
  79. on _noenergy {
  80.     playfeedbacksound book:feedback/noenergy.wav
  81.     textmessage notenough_energy
  82. }
  83.  
  84. #-------------------------------------------------------------------------------
  85. #   The player tries to open an empty menu
  86. #-------------------------------------------------------------------------------
  87. on _emptymenu {
  88.     playfeedbacksound book:feedback/emptymenu.wav
  89.     textmessage belt_empty
  90. }
  91.  
  92. #-------------------------------------------------------------------------------
  93. #   A possessed airplane has been destroyed
  94. #-------------------------------------------------------------------------------
  95. on _airplane_destroyed {
  96.     playfeedbacksound book:feedback/airplane_destroyed.wav
  97.     textmessage airplane_destroyed
  98. }
  99.  
  100. #-------------------------------------------------------------------------------
  101. #   A possessed building has been destroyed
  102. #-------------------------------------------------------------------------------
  103. on _building_destroyed {
  104.     playfeedbacksound book:feedback/building_destroyed.wav
  105.     textmessage building_destroyed
  106. }
  107.  
  108. #--------------------------------------------
  109. # The islanddrive has been activated
  110. #-------------------------------------------------------------------------------
  111. on _drive_activated {
  112.     playfeedbacksound book:feedback/drive_activated.wav
  113.     textmessage drive_activated
  114. }
  115.  
  116. #--------------------------------------------
  117. # The islanddrive has been activated
  118. #-------------------------------------------------------------------------------
  119. on _drive_deactivated {
  120.     playfeedbacksound book:feedback/drive_deactivated.wav
  121.     textmessage drive_deactivated
  122. }
  123.  
  124. #--------------------------------------------
  125. # The lighthouse energy is low
  126. #-------------------------------------------------------------------------------
  127. on _energy_low {
  128.     playfeedbacksound book:feedback/energy_low.wav
  129.     textmessage energy_low
  130. }
  131.  
  132. #--------------------------------------------
  133. # No energy to shoot
  134. #-------------------------------------------------------------------------------
  135. on _no_ammunition {
  136.     playfeedbacksound book:feedback/no_ammunition.wav
  137.     textmessage no_ammunition
  138. }
  139.  
  140. #--------------------------------------------
  141. # Airplane explodes because of distance death
  142. #-------------------------------------------------------------------------------
  143. on _radius_reached {
  144.     playfeedbacksound book:feedback/radius_reached.wav
  145.     textmessage radius_reached
  146. }
  147.  
  148. #--------------------------------------------
  149. # player takes control of vehicle
  150. #-------------------------------------------------------------------------------
  151. on _taken_control {
  152.     playfeedbacksound book:feedback/taken_control.wav
  153.     textmessage taken_control
  154. }
  155.  
  156. #--------------------------------------------
  157. # player stands inside house menu area
  158. #-------------------------------------------------------------------------------
  159. on _use {
  160.     playfeedbacksound book:feedback/use_ok.wav
  161.     textmessage use
  162. }
  163.  
  164. #-------------------------------------------------------------------------------
  165. #   The player's belt is full
  166. #-------------------------------------------------------------------------------
  167. on _beltfull {
  168.     playfeedbacksound book:feedback/beltfull.wav
  169.     textmessage belt_full
  170. }
  171.  
  172. #-------------------------------------------------------------------------------
  173. #   The current build slot is occupied
  174. #-------------------------------------------------------------------------------
  175. on _buildslotblocked {
  176.     playfeedbacksound book:feedback/buildslot_blocked.wav
  177.     textmessage buildslot_blocked
  178. }
  179.  
  180. #-------------------------------------------------------------------------------
  181. #   The maennel can suddenly FLY
  182. #-------------------------------------------------------------------------------
  183. on _maennelcanfly {
  184.     playfeedbacksound book:feedback/backpack_active.wav
  185.     textmessage backpack_active
  186. }
  187.  
  188. #-------------------------------------------------------------------------------
  189. #   The maennel was attacked
  190. #-------------------------------------------------------------------------------
  191. on _maennelattacked {
  192.     playfeedbacksound book:feedback/maennelattacked.wav
  193. }
  194.  
  195. #-------------------------------------------------------------------------------
  196. #   The maennel was killed
  197. #-------------------------------------------------------------------------------
  198. on _maennelkilled {
  199.     if {[/world.isnetsession]} {
  200.         respawn_character
  201.     } else {
  202.         set lalive false
  203.         set uclan [/world.getuserclan]
  204.         if {$uclan != "null"} {
  205.             set uland [$uclan.getplayerisland]
  206.             if {$uland != "null"} {
  207.                 if {[$uland.getenergy] > 0} {
  208.                     set lalive true
  209.                 }
  210.             }
  211.         }
  212.         if {$lalive == "true"} {
  213.             newv chptr_fadeout
  214.             oneshottimer 3 _gameover
  215.         } else {
  216.             oneshottimer 4 _gameover_fadeout
  217.             oneshottimer 7 _gameover             
  218.         }
  219.     }
  220. }
  221.  
  222. #-------------------------------------------------------------------------------
  223. #   Game over fade out
  224. #-------------------------------------------------------------------------------
  225. on _gameover_fadeout {
  226.     newv chptr_fadeout
  227. }
  228.  
  229. #-------------------------------------------------------------------------------
  230. #   Game over
  231. #-------------------------------------------------------------------------------
  232. on _gameover {
  233.     nm_ingame_endgame
  234. }
  235.  
  236.  
  237. #-------------------------------------------------------------------------------
  238. #   HouseMenu: repair
  239. #-------------------------------------------------------------------------------
  240. on _menuinforepair {
  241.     textmessage repair
  242. }
  243.  
  244. #-------------------------------------------------------------------------------
  245. #   HouseMenu: remove
  246. #-------------------------------------------------------------------------------
  247. on _menuinforemove {
  248.     textmessage trash
  249. }
  250.  
  251. #-------------------------------------------------------------------------------
  252. #   HouseMenu: default
  253. #-------------------------------------------------------------------------------
  254. on _menuinfodefault {
  255.     textmessage use
  256. }
  257.  
  258. #-------------------------------------------------------------------------------
  259. #   HouseMenu: sleep
  260. #-------------------------------------------------------------------------------
  261. on _menuinfosleep {
  262.     textmessage deactivate
  263. }
  264.  
  265. #-------------------------------------------------------------------------------
  266. #   HouseMenu: wake
  267. #-------------------------------------------------------------------------------
  268. on _menuinfowake {
  269.     textmessage activate
  270. }
  271.  
  272. #-------------------------------------------------------------------------------
  273. #   HouseMenu: input
  274. #-------------------------------------------------------------------------------
  275. on _menuinfoinput {
  276.     textmessage input
  277. }
  278.  
  279. #-------------------------------------------------------------------------------
  280. #   HouseMenu: output
  281. #-------------------------------------------------------------------------------
  282. on _menuinfooutput {
  283.     textmessage output
  284. }
  285.  
  286. #-------------------------------------------------------------------------------
  287. #   ArtefactMenu: Garage
  288. #-------------------------------------------------------------------------------
  289. on _infogarage {
  290.     textmessage scoutgarage
  291. }
  292.  
  293. #-------------------------------------------------------------------------------
  294. #   ArtefactMenu: Storage
  295. #-------------------------------------------------------------------------------
  296. on _infostorage {
  297.     textmessage artefakttresor
  298. }
  299.  
  300. #-------------------------------------------------------------------------------
  301. #   ArtefactMenu: Press 
  302. #-------------------------------------------------------------------------------
  303. on _infopress {
  304.     textmessage artefactpress
  305. }
  306.  
  307. #-------------------------------------------------------------------------------
  308. #   ArtefactMenu: Flakbuilding
  309. #-------------------------------------------------------------------------------
  310. on _infoflakbuilding {
  311.     textmessage guntower
  312. }
  313.  
  314. #-------------------------------------------------------------------------------
  315. #   ArtefactMenu: IslandDrive
  316. #-------------------------------------------------------------------------------
  317. on _infoislanddrive {
  318.     textmessage navtower
  319. }
  320.  
  321. #-------------------------------------------------------------------------------
  322. #   ArtefactMenu: Powerplant
  323. #-------------------------------------------------------------------------------
  324. on _infopowerplant {
  325.     textmessage sammler
  326. }
  327.  
  328. #-------------------------------------------------------------------------------
  329. #   ArtefactMenu: Windmill
  330. #-------------------------------------------------------------------------------
  331. on _infowindmill {
  332.     textmessage powerplant
  333. }
  334.  
  335. #-------------------------------------------------------------------------------
  336. #   ArtefactMenu: spellbomb 
  337. #-------------------------------------------------------------------------------
  338. on _infospellbomb {
  339.     textmessage spellbomb
  340. }
  341.  
  342. #-------------------------------------------------------------------------------
  343. #   ArtefactMenu: spell 
  344. #-------------------------------------------------------------------------------
  345. on _infospell {
  346.     textmessage spell1
  347. }
  348.  
  349. #-------------------------------------------------------------------------------
  350. #   ArtefactMenu: Leveldrive
  351. #-------------------------------------------------------------------------------
  352. on _infoleveldrive {
  353.     textmessage ebenenantrieb
  354. }
  355.  
  356. #-------------------------------------------------------------------------------
  357. #   ArtefactMenu: Silo
  358. #-------------------------------------------------------------------------------
  359. on _infosilo {
  360.     textmessage silo
  361. }
  362.  
  363. #-------------------------------------------------------------------------------
  364. #   Keine Boosterladungen mehr
  365. #-------------------------------------------------------------------------------
  366. on _noboostercharges {
  367.     textmessage backpack_empty
  368. }
  369.  
  370. #-------------------------------------------------------------------------------
  371. #   Hindernis im Weg
  372. #-------------------------------------------------------------------------------
  373. on _islandcollided {
  374.     textmessage way_blocked
  375. }
  376.  
  377. #-------------------------------------------------------------------------------
  378. #   Zuweit draussen
  379. #-------------------------------------------------------------------------------
  380. on _islandoutside {
  381.     textmessage radius_reached
  382. }
  383.  
  384. #-------------------------------------------------------------------------------
  385. #   neues artefakt zamnandergebastelt
  386. #-------------------------------------------------------------------------------
  387. on _transformsuccess {
  388.     textmessage success
  389. }
  390.  
  391. #-------------------------------------------------------------------------------
  392. #   kein gueltiges rezept
  393. #-------------------------------------------------------------------------------
  394. on _transformfailed {
  395.     textmessage unknown
  396. }
  397.  
  398. #-------------------------------------------------------------------------------
  399. #   kein gueltiges rezept
  400. #-------------------------------------------------------------------------------
  401. on _nonavpoint {
  402.     textmessage not_available
  403. }
  404.  
  405. #-------------------------------------------------------------------------------
  406. #   is voll
  407. #-------------------------------------------------------------------------------
  408. on _storagefull {
  409.     playfeedbacksound book:feedback/storagefull.wav
  410. }
  411.  
  412. #-------------------------------------------------------------------------------
  413. #   reingeladen
  414. #-------------------------------------------------------------------------------
  415. on _storageinput {
  416.     playfeedbacksound book:feedback/storageinput.wav
  417. }
  418.  
  419. #-------------------------------------------------------------------------------
  420. #   schlafen legen
  421. #-------------------------------------------------------------------------------
  422. on _garagesleep {
  423.     playfeedbacksound book:feedback/garagesleep.wav
  424. }
  425.  
  426. #-------------------------------------------------------------------------------
  427. #   aufwecken
  428. #-------------------------------------------------------------------------------
  429. on _garagewake {
  430.     playfeedbacksound book:feedback/garagewake.wav
  431. }
  432.  
  433. #-------------------------------------------------------------------------------
  434.  
  435.  
  436.